
using System;
using System.Collections.Generic;
using System.Text;

namespace needle.Appointments {

    public class NewAppointmentEventArgs : EventArgs {
        public NewAppointmentEventArgs(string subject, DateTime start, DateTime end) {
            m_StartDate = start;
            m_EndDate = end;
            m_Subject = subject;
        }

        public NewAppointmentEventArgs(IAppointment appointment) {
            m_StartDate = appointment.StartDate;
            m_EndDate = appointment.EndDate;
            m_Subject = appointment.String;

            Appointment = appointment;
        }

        private IAppointment m_Appointment;

        public IAppointment Appointment {
            set { m_Appointment = value; }
            get { return m_Appointment; }
        }

        private string m_Subject;

        public string Subject {
            get { return m_Subject; }
        }

        private DateTime m_StartDate;

        public DateTime StartDate {
            get { return m_StartDate; }
        }

        private DateTime m_EndDate;

        public DateTime EndDate {
            get { return m_EndDate; }
        }
    }

    public delegate void NewAppointmentEventHandler(object sender, NewAppointmentEventArgs args);
}
